package org.jeecg.common.modules.withdraw.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.modules.order.vo.OrderInfoReqVo;
import org.jeecg.common.modules.withdraw.entity.WithdrawRecord;
import org.jeecg.common.modules.withdraw.vo.WithDrawReqVo;
import org.jeecg.common.util.enums.WithdrawRecordStatusEnum;

import java.util.List;

/**
 * @Description: withdraw_record
 * @Author: jeecg-boot
 * @Date:   2020-08-22
 * @Version: V1.0
 */
public interface IWithdrawRecordService extends IService<WithdrawRecord> {

    /**
     * 获取提现信息
     * @param flowId
     * @return
     */
    WithdrawRecord getByFlowId(String flowId);

    /**
     * 审核提现信息
     * @param statusEnum 审核后状态（通过/拒绝）
     * @param loginUser  当前登陆人
     * @param reason     拒绝原因（通过时不传）
     * @param id         提现记录id
     * @return
     */
    Result audit(WithdrawRecordStatusEnum statusEnum, String loginUser, String reason, String id);


    /**
     * 发起提现
     * @param doctorId  医生id
     * @param loginUser 登陆人
     * @return
     */
    Result withdraw(String doctorId,String loginUser);

    /**
     * 查询提现信息
     * @param doctorName
     * @param mobile
     * @param doctorName
     * @param dataStart
     * @param pageSize
     * @return
     */
    List<WithDrawReqVo> getWithDrawInfo(String doctorName, String mobile, Integer dataStart, Integer pageSize);

    /**
     * 获取数量
     * @param doctorName
     * @param mobile
     * @return
     */
    int getWithDrawCount(String doctorName, String mobile);

    /**
     * 查询在进行的（账户——账户流水——提现记录）的数量
     * @param accountId
     * @return
     */
    int getAccountDrawStateCount( String accountId);
}
